<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible"="IE=edge">
    <meta name="viewport"="width=device-width, initial-scale=1.0">
    <title>主页面</title>
    <style>
        /* 整体页面样式 */
        body {
            font-family: Arial, sans-serif;
            background-color: #7b9beb;
            padding: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            margin: 0;
        }

        /* 标题样式 */
        h1 {
            color: #333;
            font-size: 32px;
            margin-bottom: 30px;
        }

        /* 按钮样式 */
       .exit-btn {
            display: inline-block;
            padding: 12px 24px;
            background-color: #8fd1e7;
            border-radius: 8px;
            cursor: pointer;
            color: white;
            font-size: 18px;
            font-weight: bold;
            border: none;
            transition: background-color 0.3s ease;
        }

        /* 按钮悬停效果 */
       .exit-btn:hover {
            background-color: #559cc4;
        }

    </style>
</head>

<body>
    <h1>登录成功，您已进入主页面</h1>
    <button class="exit-btn">退出登录</button>
    <script>
        const exitBtn = document.querySelector('.exit-btn');
        exitBtn.addEventListener('click', function () {
            location.href = '/';
        });
    </script>
</body>

</html>